package
{
	public class queue
	{
		var size : int;
		
		var first : node;
		var last : node;
		
		public function queue()
		{
			size=0;
		}
		
		public function isEmpty():Boolean
		{
			return size==0;
		}
		
		public function pop():void
		{
			if(size==0)
				return ;
			
			first=first.next;
			
			size--;
		}
		
		public function push(x:Object):void
		{
			var aux : node = new node();
			
			aux.next=null;
			aux.data=x;
			
			if(size==0)
			{	
				first=aux;
				last=aux;
			}
			else
			{
				last.next=aux;
				last=aux;
			}
			
			size++;
		}
		
		public function front():Object
		{
			return first.data;
		}
	}
}